{extend name="layout" /}
{block name="content"}
<div class="mui-content">
	<div class="uk-margin-small-top">
		<div class="my-info-cell">
			<div class="tm-df-size">
				<ul class="mui-table-view max">
					<li class="mui-table-view-cell">
						<a class="mui-navigate-right" href="Javascript:" onclick="coco_open_gallery(this, 1)" coco-url="{:url('v1/adminuser/update')}" coco-callback="coco_suc" coco-data="{ field:'avatar'}">
							<div class="tm-cell-pad">
								<div class="tm-flex flex-align-center">
									<div class="tm-flex-1">
										<span class="tm-font-bold">我的头像</span>
									</div>
									<div class="tm-atav">
										<div class="tm-location-parent">
											<div class="tm-location-img" style="background-image: url({$uinfo.avatar});" id="avatar"></div>
											<img class="redundant-img" src="{$images_path}px-1.png" alt="" width="100">
										</div>
									</div>
								</div>
							</div>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<a class="mui-navigate-right" href="{:url('member_info')}">
							<div class="tm-cell-pad">
								<div class="tm-flex flex-align-center">
									<div class="tm-flex-1">
										<span class="tm-font-bold">个人信息</span>
									</div>
								</div>
							</div>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<a class="mui-navigate-right" href="{:url('address')}">
							<div class="tm-cell-pad">
								<div class="tm-flex flex-align-center">
									<div class="tm-flex-1">
										<span class="tm-font-bold">收货地址</span>
									</div>
								</div>
							</div>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<a class="mui-navigate-right" href="{:url('editpwd')}">
							<div class="tm-cell-pad">
								<div class="tm-flex flex-align-center">
									<div class="tm-flex-1">
										<span class="tm-font-bold">修改密码</span>
									</div>
								</div>
							</div>
						</a>
					</li>
					<!-- <li class="mui-table-view-cell">
						<a class="mui-navigate-right" href="{:url('news/content',['catid'=>2])}">
							<div class="tm-cell-pad">
								<div class="tm-flex flex-align-center">
									<div class="tm-flex-1">
										<span class="tm-font-bold">会员权益</span>
										<span class="tm-font-bold" style="float: right;">{$uinfo.rolename}</span>
									</div>
								</div>
							</div>
						</a>
					</li> -->
				</ul>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	function suc_back (obj, data) {
		var field = data.request.field;
		$.each(data.response, function(index, item) {
			if (index == field && item !== '') {
				$(obj).children('span:first-child').html(item);
			};
		});
	}
	function coco_success (obj, datajson) {
		var data = obj.attr("primaryValues");
		var arr = eval("(" + data + ")");//eval() 函数可计算某个字符串，并执行其中的的 JavaScript 代码。
		var business = datajson.response.business;
		$.each(arr, function(index, item) {
			if (item.id == business) {
				obj.children('span:first-child').html(item.name);
			}
		});
	}
	function coco_suc (obj, data) {
		coco_refresh_window();
	}
</script>
{/block}